package com.wocao.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wocao.entity.SysDictData;
import com.wocao.entity.SysDictTypeAndDateCheck;
import com.wocao.entity.SysLogininfor;
import com.wocao.mapper.SysOperLogMapper;
import com.wocao.service.SysLogininforService;
import com.wocao.mapper.SysLogininforMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
*
*/
@Service
public class SysLogininforServiceImpl extends ServiceImpl<SysLogininforMapper, SysLogininfor>
implements SysLogininforService{

    @Autowired
    private SysLogininforMapper sysLogininforMapper;
    @Override
    public List<SysLogininfor> selectByTree(SysDictTypeAndDateCheck s) {
        return sysLogininforMapper.selectByTree(s.getStartDate(),s.getEndDate(),s.getStatus(),s.getLoginLocation(),
                s.getUserName());
    }

    @Override
    public Page<SysLogininfor> getPage(Page<SysLogininfor> page, SysDictTypeAndDateCheck c) {
        return sysLogininforMapper.getPage(page,c.getLoginLocation(),c.getUserName(),c.getStatus()
                ,c.getStartDate(),c.getEndDate());
    }
}
